home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / B-C / C++Source Code Fmtr.cpt / Src / HandleManager.h < prev    next >
MacBinary  |  1992-04-27  |  4.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: HandleManager.h

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Apr 27 19:17:14 1992, modified Mon Apr 27 19:17:14 1992, creator 'MPS ', type ASCII, 3633 bytes "HandleManager.h" , at 0xeb1 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 48 61 6e 64 6c 65 | 4d 61 6e 61 67 65 72 2e |..Handle|Manager.|
|00000010| 68 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |h.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0e 31 00 | 00 01 da a6 22 3b fa a6 |......1.|....";..|
|00000060| 22 3b fa 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |";......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 31 76 00 00 |........|....1v..|
|00000080| 23 69 66 6e 64 65 66 20 | 5f 5f 48 41 4e 44 4c 45 |#ifndef |__HANDLE|
|00000090| 4d 41 4e 41 47 45 52 5f | 5f 0d 23 64 65 66 69 6e |MANAGER_|_.#defin|
|000000a0| 65 20 5f 5f 48 41 4e 44 | 4c 45 4d 41 4e 41 47 45 |e __HAND|LEMANAGE|
|000000b0| 52 5f 5f 09 31 0d 0d 23 | 70 72 61 67 6d 61 20 6f |R__.1..#|pragma o|
|000000c0| 6e 63 65 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 53 |nce..#if|ndef __S|
|000000d0| 54 44 44 45 46 5f 5f 0d | 23 69 6e 63 6c 75 64 65 |TDDEF__.|#include|
|000000e0| 20 3c 73 74 64 64 65 66 | 2e 68 3e 0d 23 65 6e 64 | <stddef|.h>.#end|
|000000f0| 69 66 0d 0d 23 69 66 6e | 64 65 66 20 5f 5f 54 59 |if..#ifn|def __TY|
|00000100| 50 45 53 5f 5f 0d 23 69 | 6e 63 6c 75 64 65 20 3c |PES__.#i|nclude <|
|00000110| 74 79 70 65 73 2e 68 3e | 0d 23 65 6e 64 69 66 0d |types.h>|.#endif.|
|00000120| 0d 0d 0d 2f 2a 0d 2a 2a | 20 48 61 6e 64 6c 65 4d |.../*.**| HandleM|
|00000130| 61 6e 61 67 65 72 0d 2a | 2a 09 54 68 65 20 4d 61 |anager.*|*.The Ma|
|00000140| 63 69 6e 74 6f 73 68 20 | 61 6c 6c 6f 77 73 20 68 |cintosh |allows h|
|00000150| 61 6e 64 6c 65 73 20 74 | 6f 20 62 65 20 61 6c 6c |andles t|o be all|
|00000160| 6f 63 61 74 65 64 20 66 | 72 6f 6d 20 74 68 65 20 |ocated f|rom the |
|00000170| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 68 65 61 70 |applicat|ion heap|
|00000180| 2c 0d 2a 2a 20 74 68 65 | 20 73 79 73 74 65 6d 20 |,.** the| system |
|00000190| 68 65 61 70 20 61 6e 64 | 20 74 68 65 20 4d 75 6c |heap and| the Mul|
|000001a0| 74 69 46 69 6e 64 65 72 | 20 68 65 61 70 2e 20 20 |tiFinder| heap. |
|000001b0| 46 72 65 71 75 65 6e 74 | 6c 79 2c 20 61 20 75 73 |Frequent|ly, a us|
|000001c0| 65 72 20 6f 66 20 68 61 | 6e 64 6c 65 73 0d 2a 2a |er of ha|ndles.**|
|000001d0| 20 77 69 6c 6c 20 77 61 | 6e 74 20 61 6c 6c 20 68 | will wa|nt all h|
|000001e0| 61 6e 64 6c 65 73 20 74 | 6f 20 62 65 20 61 6c 6c |andles t|o be all|
|000001f0| 6f 63 61 74 65 64 20 66 | 72 6f 6d 20 61 20 70 61 |ocated f|rom a pa|
|00000200| 72 74 69 63 75 6c 61 72 | 20 68 65 61 70 2e 20 20 |rticular| heap. |
|00000210| 48 6f 77 65 76 65 72 2c | 0d 2a 2a 20 74 68 65 20 |However,|.** the |
|00000220| 76 61 72 69 6f 75 73 20 | 66 6c 61 76 6f 72 73 20 |various |flavors |
|00000230| 6f 66 20 68 65 61 70 20 | 68 61 76 65 20 73 75 62 |of heap |have sub|
|00000240| 74 6c 65 20 64 69 66 66 | 65 72 65 6e 63 65 73 20 |tle diff|erences |
|00000250| 77 68 69 63 68 20 73 68 | 6f 75 6c 64 20 62 65 0d |which sh|ould be.|
|00000260| 2a 2a 20 65 6e 63 61 70 | 73 75 6c 61 74 65 64 20 |** encap|sulated |
|00000270| 77 69 74 68 69 6e 20 61 | 20 63 6c 61 73 73 2e 20 |within a| class. |
|00000280| 20 43 6f 6e 73 65 71 75 | 65 6e 74 6c 79 2c 20 61 | Consequ|ently, a|
|00000290| 20 48 61 6e 64 6c 65 4d | 61 6e 61 67 65 72 20 63 | HandleM|anager c|
|000002a0| 6c 61 73 73 20 69 73 0d | 2a 2a 20 64 65 66 69 6e |lass is.|** defin|
|000002b0| 65 64 20 77 68 69 63 68 | 20 65 6e 63 61 70 73 75 |ed which| encapsu|
|000002c0| 6c 61 74 65 73 20 74 68 | 65 73 65 20 64 69 66 66 |lates th|ese diff|
|000002d0| 65 72 65 6e 63 65 73 0d | 2a 2f 0d 0d 0d 2f 2f b5 |erences.|*/...//.|
|000002e0| 20 65 6e 75 6d 20 48 61 | 6e 64 6c 65 4d 61 6e 61 | enum Ha|ndleMana|
|000002f0| 67 65 72 48 65 61 70 0d | 65 6e 75 6d 20 48 61 6e |gerHeap.|enum Han|
|00000300| 64 6c 65 4d 61 6e 61 67 | 65 72 48 65 61 70 20 7b |dleManag|erHeap {|
|00000310| 0d 09 6b 41 70 70 48 61 | 6e 64 6c 65 4d 61 6e 61 |..kAppHa|ndleMana|
|00000320| 67 65 72 2c 09 09 09 09 | 09 09 09 2f 2f 20 41 6c |ger,....|...// Al|
|00000330| 6c 6f 63 61 74 65 20 66 | 72 6f 6d 20 61 70 70 6c |locate f|rom appl|
|00000340| 69 63 61 74 69 6f 6e 20 | 68 65 61 70 0d 09 6b 53 |ication |heap..kS|
|00000350| 79 73 48 61 6e 64 6c 65 | 4d 61 6e 61 67 65 72 2c |ysHandle|Manager,|
|00000360| 09 09 09 09 09 09 09 2f | 2f 20 41 6c 6c 6f 63 61 |......./|/ Alloca|
|00000370| 74 65 20 66 72 6f 6d 20 | 74 68 65 20 73 79 73 74 |te from |the syst|
|00000380| 65 6d 20 68 65 61 70 0d | 09 6b 54 65 6d 70 48 61 |em heap.|.kTempHa|
|00000390| 6e 64 6c 65 4d 61 6e 61 | 67 65 72 09 09 09 09 09 |ndleMana|ger.....|
|000003a0| 09 09 2f 2f 20 41 6c 6c | 6f 63 61 74 65 20 66 72 |..// All|ocate fr|
|000003b0| 6f 6d 20 74 68 65 20 74 | 65 6d 70 6f 72 61 72 79 |om the t|emporary|
|000003c0| 20 28 6e 65 65 20 4d 75 | 6c 74 69 46 69 6e 64 65 | (nee Mu|ltiFinde|
|000003d0| 72 29 20 68 65 61 70 0d | 7d 3b 0d 0d 0d 0d 0d 2f |r) heap.|};...../|
|000003e0| 2f 0d 2f 2f b5 20 63 6c | 61 73 73 20 48 61 6e 64 |/.//. cl|ass Hand|
|000003f0| 6c 65 4d 61 6e 61 67 65 | 72 0d 2f 2f 09 54 68 69 |leManage|r.//.Thi|
|00000400| 73 20 63 6c 61 73 73 20 | 65 78 70 6f 72 74 73 20 |s class |exports |
|00000410| 72 6f 75 74 69 6e 65 73 | 20 66 6f 72 20 61 6c 6c |routines| for all|
|00000420| 6f 63 61 74 69 6e 67 2c | 20 72 65 73 69 7a 69 6e |ocating,| resizin|
|00000430| 67 20 61 6e 64 20 64 69 | 73 70 6f 73 69 6e 67 20 |g and di|sposing |
|00000440| 6f 66 0d 2f 2f 20 68 61 | 6e 64 6c 65 73 2e 20 20 |of.// ha|ndles. |
|00000450| 54 68 65 20 62 61 73 65 | 20 63 6c 61 73 73 20 70 |The base| class p|
|00000460| 72 6f 76 69 64 65 73 20 | 73 75 70 70 6f 72 74 20 |rovides |support |
|00000470| 66 6f 72 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |for the |applicat|
|00000480| 69 6f 6e 20 68 65 61 70 | 3b 20 74 68 65 0d 2f 2f |ion heap|; the.//|
|00000490| 20 64 65 72 69 76 65 64 | 20 63 6c 61 73 73 65 73 | derived| classes|
|000004a0| 20 73 75 70 70 6f 72 74 | 20 74 68 65 20 73 79 73 | support| the sys|
|000004b0| 74 65 6d 20 68 65 61 70 | 20 61 6e 64 20 74 68 65 |tem heap| and the|
|000004c0| 20 74 65 6d 70 6f 72 61 | 72 79 20 6d 65 6d 6f 72 | tempora|ry memor|
|000004d0| 79 20 68 65 61 70 73 2e | 0d 63 6c 61 73 73 20 48 |y heaps.|.class H|
|000004e0| 61 6e 64 6c 65 4d 61 6e | 61 67 65 72 20 3a 20 70 |andleMan|ager : p|
|000004f0| 75 62 6c 69 63 20 53 69 | 6e 67 6c 65 4f 62 6a 65 |ublic Si|ngleObje|
|00000500| 63 74 20 7b 0d 70 75 62 | 6c 69 63 3a 0d 09 76 69 |ct {.pub|lic:..vi|
|00000510| 72 74 75 61 6c 20 76 6f | 69 64 20 53 65 74 48 61 |rtual vo|id SetHa|
|00000520| 6e 64 6c 65 53 69 7a 65 | 28 76 6f 69 64 20 2a 2a |ndleSize|(void **|
|00000530| 61 48 61 6e 64 6c 65 2c | 20 73 69 7a 65 5f 74 20 |aHandle,| size_t |
|00000540| 6e 65 77 53 69 7a 65 2c | 20 4f 53 45 72 72 20 2a |newSize,| OSErr *|
|00000550| 61 6e 45 72 72 29 3b 0d | 09 76 69 72 74 75 61 6c |anErr);.|.virtual|
|00000560| 20 73 69 7a 65 5f 74 20 | 47 65 74 48 61 6e 64 6c | size_t |GetHandl|
|00000570| 65 53 69 7a 65 28 76 6f | 69 64 20 2a 2a 61 48 61 |eSize(vo|id **aHa|
|00000580| 6e 64 6c 65 2c 20 4f 53 | 45 72 72 20 2a 61 6e 45 |ndle, OS|Err *anE|
|00000590| 72 72 29 3b 0d 09 2f 2f | 20 53 65 74 2f 67 65 74 |rr);..//| Set/get|
|000005a0| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|000005b0| 20 68 61 6e 64 6c 65 0d | 0d 09 76 69 72 74 75 61 | handle.|..virtua|
|000005c0| 6c 20 76 6f 69 64 20 48 | 4c 6f 63 6b 28 76 6f 69 |l void H|Lock(voi|
|000005d0| 64 20 2a 2a 61 48 61 6e | 64 6c 65 2c 20 4f 53 45 |d **aHan|dle, OSE|
|000005e0| 72 72 20 2a 61 6e 45 72 | 72 29 3b 0d 09 76 69 72 |rr *anEr|r);..vir|
|000005f0| 74 75 61 6c 20 76 6f 69 | 64 20 48 55 6e 6c 6f 63 |tual voi|d HUnloc|
|00000600| 6b 28 76 6f 69 64 20 2a | 2a 61 48 61 6e 64 6c 65 |k(void *|*aHandle|
|00000610| 2c 20 4f 53 45 72 72 20 | 2a 61 6e 45 72 72 29 3b |, OSErr |*anErr);|
|00000620| 0d 09 76 69 72 74 75 61 | 6c 20 76 6f 69 64 20 4d |..virtua|l void M|
|00000630| 6f 76 65 48 48 69 28 76 | 6f 69 64 20 2a 2a 61 48 |oveHHi(v|oid **aH|
|00000640| 61 6e 64 6c 65 2c 20 4f | 53 45 72 72 20 2a 61 6e |andle, O|SErr *an|
|00000650| 45 72 72 29 3b 0d 09 2f | 2f 20 48 61 6e 64 6c 65 |Err);../|/ Handle|
|00000660| 20 6d 75 6e 67 69 6e 67 | 20 6f 70 65 72 61 74 69 | munging| operati|
|00000670| 6f 6e 73 0d 0d 09 76 69 | 72 74 75 61 6c 20 76 6f |ons...vi|rtual vo|
|00000680| 69 64 20 2a 2a 4e 65 77 | 48 61 6e 64 6c 65 28 73 |id **New|Handle(s|
|00000690| 69 7a 65 5f 74 20 61 53 | 69 7a 65 2c 20 4f 53 45 |ize_t aS|ize, OSE|
|000006a0| 72 72 20 2a 61 6e 45 72 | 72 29 3b 0d 09 76 69 72 |rr *anEr|r);..vir|
|000006b0| 74 75 61 6c 20 76 6f 69 | 64 20 44 69 73 70 6f 73 |tual voi|d Dispos|
|000006c0| 48 61 6e 64 6c 65 28 76 | 6f 69 64 20 2a 2a 61 48 |Handle(v|oid **aH|
|000006d0| 61 6e 64 6c 65 2c 20 4f | 53 45 72 72 20 2a 61 6e |andle, O|SErr *an|
|000006e0| 45 72 72 29 3b 0d 09 2f | 2f 20 41 6c 6c 6f 63 61 |Err);../|/ Alloca|
|000006f0| 74 65 20 61 6e 64 20 64 | 69 73 70 6f 73 65 20 68 |te and d|ispose h|
|00000700| 61 6e 64 6c 65 73 0d 0d | 09 76 69 72 74 75 61 6c |andles..|.virtual|
|00000710| 20 76 6f 69 64 20 44 75 | 70 6c 69 63 61 74 65 28 | void Du|plicate(|
|00000720| 76 6f 69 64 20 2a 2a 61 | 53 72 63 48 61 6e 64 6c |void **a|SrcHandl|
|00000730| 65 2c 20 76 6f 69 64 20 | 2a 2a 2a 61 44 73 74 48 |e, void |***aDstH|
|00000740| 61 6e 64 6c 65 2c 20 4f | 53 45 72 72 20 2a 61 6e |andle, O|SErr *an|
|00000750| 45 72 72 29 3b 0d 09 2f | 2f 20 4d 61 6b 65 20 61 |Err);../|/ Make a|
|00000760| 20 63 6f 70 79 20 6f 66 | 20 61 20 68 61 6e 64 6c | copy of| a handl|
|00000770| 65 2e 20 20 61 44 73 74 | 48 61 6e 64 6c 65 20 69 |e. aDst|Handle i|
|00000780| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 61 |s a poin|ter to a|
|00000790| 20 68 61 6e 64 6c 65 2e | 20 20 4f 6e 0d 09 2f 2f | handle.| On..//|
|000007a0| 20 73 75 63 63 65 73 73 | 66 75 6c 20 72 65 74 75 | success|ful retu|
|000007b0| 72 6e 2c 20 69 74 20 77 | 69 6c 6c 20 62 65 20 61 |rn, it w|ill be a|
|000007c0| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 76 61 6c | copy of| the val|
|000007d0| 75 65 73 20 69 6e 20 61 | 53 72 63 48 61 6e 64 6c |ues in a|SrcHandl|
|000007e0| 65 2e 0d 0d 09 76 69 72 | 74 75 61 6c 20 73 69 7a |e....vir|tual siz|
|000007f0| 65 5f 74 20 46 72 65 65 | 4d 65 6d 28 29 3b 0d 09 |e_t Free|Mem();..|
|00000800| 76 69 72 74 75 61 6c 20 | 73 69 7a 65 5f 74 20 4d |virtual |size_t M|
|00000810| 61 78 4d 65 6d 28 73 69 | 7a 65 5f 74 20 2a 67 72 |axMem(si|ze_t *gr|
|00000820| 6f 77 29 3b 0d 09 2f 2f | 20 46 72 65 65 4d 65 6d |ow);..//| FreeMem|
|00000830| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 74 6f 74 | returns| the tot|
|00000840| 61 6c 20 66 72 65 65 20 | 6d 65 6d 6f 72 79 2e 20 |al free |memory. |
|00000850| 20 4d 61 78 4d 65 6d 20 | 63 6f 6d 70 61 63 74 73 | MaxMem |compacts|
|00000860| 20 74 68 65 20 68 65 61 | 70 20 7a 6f 6e 65 0d 09 | the hea|p zone..|
|00000870| 2f 2f 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |// and r|eturns t|
|00000880| 68 65 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 6c |he size |of the l|
|00000890| 61 72 67 65 73 74 20 63 | 6f 6e 74 69 67 75 6f 75 |argest c|ontiguou|
|000008a0| 73 20 62 6c 6f 63 6b 20 | 61 76 61 69 6c 61 62 6c |s block |availabl|
|000008b0| 65 20 66 6f 72 0d 09 2f | 2f 20 61 6c 6c 6f 63 61 |e for../|/ alloca|
|000008c0| 74 69 6f 6e 2e 20 20 22 | 67 72 6f 77 22 20 69 73 |tion. "|grow" is|
|000008d0| 20 73 65 74 20 74 6f 20 | 74 68 65 20 6d 61 78 69 | set to |the maxi|
|000008e0| 6d 75 6d 20 6e 75 6d 62 | 65 72 20 6f 66 20 62 79 |mum numb|er of by|
|000008f0| 74 65 73 20 62 79 20 77 | 68 69 63 68 20 74 68 65 |tes by w|hich the|
|00000900| 0d 09 2f 2f 20 7a 6f 6e | 65 20 63 61 6e 20 67 72 |..// zon|e can gr|
|00000910| 6f 77 2e 20 20 54 68 65 | 20 76 61 6c 75 65 20 69 |ow. The| value i|
|00000920| 73 20 30 20 66 6f 72 20 | 61 6c 6c 20 62 75 74 20 |s 0 for |all but |
|00000930| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00000940| 68 65 61 70 2e 0d 0d 0d | 70 75 62 6c 69 63 3a 0d |heap....|public:.|
|00000950| 09 73 74 61 74 69 63 20 | 48 61 6e 64 6c 65 4d 61 |.static |HandleMa|
|00000960| 6e 61 67 65 72 20 2a 47 | 65 74 4d 61 6e 61 67 65 |nager *G|etManage|
|00000970| 72 28 48 61 6e 64 6c 65 | 4d 61 6e 61 67 65 72 48 |r(Handle|ManagerH|
|00000980| 65 61 70 20 77 68 69 63 | 68 48 65 61 70 29 3b 0d |eap whic|hHeap);.|
|00000990| 09 2f 2f 20 54 68 69 73 | 20 73 74 61 74 69 63 20 |.// This| static |
|000009a0| 6d 65 74 68 6f 64 20 72 | 65 74 75 72 6e 73 20 61 |method r|eturns a|
|000009b0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 61 20 48 61 | pointer| to a Ha|
|000009c0| 6e 64 6c 65 4d 61 6e 61 | 67 65 72 20 66 6f 72 20 |ndleMana|ger for |
|000009d0| 74 68 65 0d 09 2f 2f 20 | 72 65 71 75 65 73 74 65 |the..// |requeste|
|000009e0| 64 20 68 65 61 70 2e 0d | 0d 0d 09 73 74 61 74 69 |d heap..|...stati|
|000009f0| 63 20 76 6f 69 64 20 53 | 65 74 4d 61 79 53 70 65 |c void S|etMaySpe|
|00000a00| 63 69 66 79 54 65 6d 70 | 4d 65 6d 6f 72 79 28 42 |cifyTemp|Memory(B|
|00000a10| 6f 6f 6c 65 61 6e 20 79 | 65 73 54 6f 54 65 6d 70 |oolean y|esToTemp|
|00000a20| 4d 65 6d 6f 72 79 29 3b | 0d 09 73 74 61 74 69 63 |Memory);|..static|
|00000a30| 20 48 61 6e 64 6c 65 4d | 61 6e 61 67 65 72 2a 20 | HandleM|anager* |
|00000a40| 47 65 74 4c 61 72 67 65 | 73 74 4d 61 6e 61 67 65 |GetLarge|stManage|
|00000a50| 72 28 29 3b 0d 09 2f 2f | 20 54 68 65 73 65 20 74 |r();..//| These t|
|00000a60| 77 6f 20 6d 65 74 68 6f | 64 73 20 77 6f 72 6b 20 |wo metho|ds work |
|00000a70| 77 69 74 68 20 65 61 63 | 68 20 6f 74 68 65 72 2e |with eac|h other.|
|00000a80| 20 20 22 47 65 74 4c 61 | 72 67 65 73 74 4d 61 6e | "GetLa|rgestMan|
|00000a90| 61 67 65 72 22 0d 09 2f | 2f 20 72 65 74 75 72 6e |ager"../|/ return|
|00000aa0| 73 20 74 68 61 74 20 6d | 61 6e 61 67 65 72 20 77 |s that m|anager w|
|00000ab0| 68 69 63 68 20 68 61 73 | 20 74 68 65 20 6c 61 72 |hich has| the lar|
|00000ac0| 67 65 73 74 20 61 6d 6f | 75 6e 74 20 6f 66 20 66 |gest amo|unt of f|
|00000ad0| 72 65 65 20 73 70 61 63 | 65 2c 0d 09 2f 2f 20 65 |ree spac|e,..// e|
|00000ae0| 69 74 68 65 72 20 74 68 | 65 20 61 70 70 6c 69 63 |ither th|e applic|
|00000af0| 61 74 69 6f 6e 20 68 65 | 61 70 20 6f 72 20 74 68 |ation he|ap or th|
|00000b00| 65 20 74 65 6d 70 6f 72 | 61 72 79 20 6d 75 6c 74 |e tempor|ary mult|
|00000b10| 69 66 69 6e 64 65 72 20 | 6d 65 6d 6f 72 79 0d 09 |ifinder |memory..|
|00000b20| 2f 2f 20 68 65 61 70 2e | 20 20 22 53 65 74 4d 61 |// heap.| "SetMa|
|00000b30| 79 53 70 65 63 69 66 79 | 54 65 6d 70 4d 65 6d 6f |ySpecify|TempMemo|
|00000b40| 72 79 22 20 69 73 20 70 | 61 73 73 65 64 20 74 72 |ry" is p|assed tr|
|00000b50| 75 65 20 69 66 20 47 65 | 74 4c 61 72 67 65 73 74 |ue if Ge|tLargest|
|00000b60| 4d 61 6e 61 67 65 72 0d | 09 2f 2f 20 69 73 20 61 |Manager.|.// is a|
|00000b70| 6c 6c 6f 77 65 64 20 74 | 6f 20 6e 61 6d 65 20 6d |llowed t|o name m|
|00000b80| 75 6c 74 69 66 69 6e 64 | 65 72 20 6d 65 6d 6f 72 |ultifind|er memor|
|00000b90| 79 2c 20 66 61 6c 73 65 | 20 69 66 20 6f 6e 6c 79 |y, false| if only|
|00000ba0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00000bb0| 0d 09 2f 2f 20 68 65 61 | 70 20 69 73 20 61 6c 6c |..// hea|p is all|
|00000bc0| 6f 77 65 64 20 74 6f 20 | 73 61 74 69 73 66 79 20 |owed to |satisfy |
|00000bd0| 72 65 71 75 65 73 74 73 | 2e 20 20 54 68 65 20 64 |requests|. The d|
|00000be0| 65 66 61 75 6c 74 20 73 | 65 74 74 69 6e 67 20 69 |efault s|etting i|
|00000bf0| 73 20 66 61 6c 73 65 2c | 0d 09 2f 2f 20 6f 6e 6c |s false,|..// onl|
|00000c00| 79 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |y the ap|plicatio|
|00000c10| 6e 20 68 65 61 70 20 69 | 73 20 61 6c 6c 6f 77 65 |n heap i|s allowe|
|00000c20| 64 2e 0d 0d 0d 70 72 69 | 76 61 74 65 3a 0d 09 73 |d....pri|vate:..s|
|00000c30| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 66 4d |tatic Bo|olean fM|
|00000c40| 61 79 53 70 65 63 69 66 | 79 54 65 6d 70 4d 65 6d |aySpecif|yTempMem|
|00000c50| 6f 72 79 3b 0d 0d 0d 70 | 72 6f 74 65 63 74 65 64 |ory;...p|rotected|
|00000c60| 3a 0d 09 69 6e 6c 69 6e | 65 20 76 6f 69 64 20 2a |:..inlin|e void *|
|00000c70| 6f 70 65 72 61 74 6f 72 | 20 6e 65 77 28 73 69 7a |operator| new(siz|
|00000c80| 65 5f 74 29 3b 0d 09 69 | 6e 6c 69 6e 65 20 76 6f |e_t);..i|nline vo|
|00000c90| 69 64 20 6f 70 65 72 61 | 74 6f 72 20 64 65 6c 65 |id opera|tor dele|
|00000ca0| 74 65 28 76 6f 69 64 20 | 2a 29 3b 0d 09 2f 2f 20 |te(void |*);..// |
|00000cb0| 4d 61 6b 65 20 74 68 65 | 73 65 20 70 72 69 76 61 |Make the|se priva|
|00000cc0| 74 65 2e 20 20 49 6e 73 | 74 61 6e 63 65 73 20 61 |te. Ins|tances a|
|00000cd0| 72 65 20 6e 6f 74 20 63 | 72 65 61 74 65 64 20 6f |re not c|reated o|
|00000ce0| 72 20 64 65 6c 65 74 65 | 64 2e 0d 7d 3b 0d 0d 0d |r delete|d..};...|
|00000cf0| 2f 2f b5 20 20 20 48 61 | 6e 64 6c 65 4d 61 6e 61 |//. Ha|ndleMana|
|00000d00| 67 65 72 3a 3a 53 65 74 | 4d 61 79 53 70 65 63 69 |ger::Set|MaySpeci|
|00000d10| 66 79 54 65 6d 70 4d 65 | 6d 6f 72 79 0d 23 70 72 |fyTempMe|mory.#pr|
|00000d20| 61 67 6d 61 20 73 65 67 | 6d 65 6e 74 20 48 61 6e |agma seg|ment Han|
|00000d30| 64 6c 65 4d 61 6e 61 67 | 65 72 0d 69 6e 6c 69 6e |dleManag|er.inlin|
|00000d40| 65 20 76 6f 69 64 20 48 | 61 6e 64 6c 65 4d 61 6e |e void H|andleMan|
|00000d50| 61 67 65 72 3a 3a 53 65 | 74 4d 61 79 53 70 65 63 |ager::Se|tMaySpec|
|00000d60| 69 66 79 54 65 6d 70 4d | 65 6d 6f 72 79 28 42 6f |ifyTempM|emory(Bo|
|00000d70| 6f 6c 65 61 6e 20 79 65 | 73 54 6f 54 65 6d 70 4d |olean ye|sToTempM|
|00000d80| 65 6d 6f 72 79 29 0d 7b | 0d 09 66 4d 61 79 53 70 |emory).{|..fMaySp|
|00000d90| 65 63 69 66 79 54 65 6d | 70 4d 65 6d 6f 72 79 20 |ecifyTem|pMemory |
|00000da0| 3d 20 79 65 73 54 6f 54 | 65 6d 70 4d 65 6d 6f 72 |= yesToT|empMemor|
|00000db0| 79 3b 0d 7d 0d 0d 0d 2f | 2f b5 20 48 61 6e 64 6c |y;.}.../|/. Handl|
|00000dc0| 65 4d 61 6e 61 67 65 72 | 3a 3a 6f 70 65 72 61 74 |eManager|::operat|
|00000dd0| 6f 72 0d 23 70 72 61 67 | 6d 61 20 73 65 67 6d 65 |or.#prag|ma segme|
|00000de0| 6e 74 20 48 61 6e 64 6c | 65 4d 61 6e 61 67 65 72 |nt Handl|eManager|
|00000df0| 0d 69 6e 6c 69 6e 65 20 | 76 6f 69 64 20 2a 48 61 |.inline |void *Ha|
|00000e00| 6e 64 6c 65 4d 61 6e 61 | 67 65 72 3a 3a 6f 70 65 |ndleMana|ger::ope|
|00000e10| 72 61 74 6f 72 20 6e 65 | 77 28 73 69 7a 65 5f 74 |rator ne|w(size_t|
|00000e20| 29 0d 7b 0d 09 72 65 74 | 75 72 6e 20 28 30 29 3b |).{..ret|urn (0);|
|00000e30| 0d 7d 0d 0d 0d 2f 2f b5 | 20 48 61 6e 64 6c 65 4d |.}...//.| HandleM|
|00000e40| 61 6e 61 67 65 72 3a 3a | 6f 70 65 72 61 74 6f 72 |anager::|operator|
|00000e50| 0d 23 70 72 61 67 6d 61 | 20 73 65 67 6d 65 6e 74 |.#pragma| segment|
|00000e60| 20 48 61 6e 64 6c 65 4d | 61 6e 61 67 65 72 0d 69 | HandleM|anager.i|
|00000e70| 6e 6c 69 6e 65 20 76 6f | 69 64 20 48 61 6e 64 6c |nline vo|id Handl|
|00000e80| 65 4d 61 6e 61 67 65 72 | 3a 3a 6f 70 65 72 61 74 |eManager|::operat|
|00000e90| 6f 72 20 64 65 6c 65 74 | 65 28 76 6f 69 64 20 2a |or delet|e(void *|
|00000ea0| 29 0d 7b 0d 7d 0d 0d 0d | 23 65 6e 64 69 66 0d 0d |).{.}...|#endif..|
|00000eb0| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 4a |........|.......J|
|00000f10| 72 6b 52 65 6c 65 61 73 | 65 2e 68 22 20 b6 0d 09 |rkReleas|e.h" ...|
|00000f20| 22 7b 43 49 6e 63 6c 75 | 64 65 73 7d 74 79 70 65 |"{CInclu|des}type|
|00000f30| 0f 48 61 6e 64 6c 65 4d | 61 6e 61 67 65 72 2e 68 |.HandleM|anager.h|
|00000f40| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 ff ff |....TEXT|MPS ....|
|00000f50| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 a5 06 36 39 00 00 | 0e 31 00 00 01 da 61 62 |....69..|.1....ab|
|00000f80| 6c 65 2e 63 70 2e 6f 22 | 09 c4 20 b6 0d 09 22 7b |le.cp.o"|.. ..."{|
|00000f90| 55 74 69 6c 69 74 69 65 | 73 7d 4e 61 6d 65 54 61 |Utilitie|s}NameTa|
|00000fa0| 62 6c 65 2e 63 70 22 20 | b6 0d 09 22 7b 43 49 6e |ble.cp" |..."{CIn|
|00000fb0| 63 6c 75 64 65 73 7d 73 | 74 72 69 6e 67 2e 68 22 |cludes}s|tring.h"|
|00000fc0| 20 b6 0d 09 22 7b 55 74 | 69 6c 69 74 69 65 73 7d | ..."{Ut|ilities}|
|00000fd0| 4e 61 6d 65 54 61 62 6c | 65 2e 68 22 20 b6 0d 09 |NameTabl|e.h" ...|
|00000fe0| 22 7b 43 49 6e 63 6c 75 | 64 65 73 7d 73 74 64 64 |"{CInclu|des}stdd|
|00000ff0| 65 66 2e 68 22 20 b6 0d | 09 22 7b 55 74 69 6c 69 |ef.h" ..|."{Utili|
|00001000| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 65 73 20 |...H..Mo|naco.es |
|00001010| 66 6f 72 20 61 6c 6c 6f | 63 61 74 69 6e 67 2c 20 |for allo|cating, |
|00001020| 72 65 73 69 7a 69 00 06 | 00 04 00 27 00 02 01 76 |resizi..|...'...v|
|00001030| 01 fe 00 27 00 02 01 76 | 01 fe a6 21 f5 aa 00 00 |...'...v|...!....|
|00001040| 0d 32 00 00 0d 32 00 00 | 00 6c 01 00 00 00 00 1e |.2...2..|.l......|
|00001050| 00 01 00 00 03 66 00 00 | 03 79 13 63 6c 61 73 73 |.....f..|.y.class|
|00001060| 20 48 61 6e 64 6c 65 4d | 61 6e 61 67 65 72 00 00 | HandleM|anager..|
|00001070| 00 1e 00 27 00 02 01 76 | 01 fe 00 27 00 02 01 76 |...'...v|...'...v|
|00001080| 01 fe 00 00 00 6c 00 00 | 00 00 00 00 00 00 00 00 |.....l..|........|
|00001090| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 4a |........|.......J|
|000010a0| 01 14 17 0c 0c 7e 00 00 | 00 1c 00 4a 00 00 4d 50 |.....~..|...J..MP|
|000010b0| 53 52 00 02 00 0a 03 ed | ff ff 00 00 00 00 00 00 |SR......|........|
|000010c0| 00 00 03 ef ff ff 00 00 | 00 4c 00 00 00 00 03 f0 |........|.L......|
|000010d0| ff ff 00 00 00 6e 01 1a | 39 1c 00 00 00 00 00 00 |.....n..|9.......|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+